package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MedicineInventoryMapper;
import com.ruoyi.system.domain.MedicineInventory;
import com.ruoyi.system.service.IMedicineInventoryService;

/**
 * 药品库存管理Service业务层处理
 * 
 * @author Mr.abc
 * @date 2024-05-29
 */
@Service
public class MedicineInventoryServiceImpl implements IMedicineInventoryService 
{
    @Autowired
    private MedicineInventoryMapper medicineInventoryMapper;

    /**
     * 查询药品库存管理
     * 
     * @param medicineId 药品库存管理主键
     * @return 药品库存管理
     */
    @Override
    public MedicineInventory selectMedicineInventoryByMedicineId(Integer medicineId)
    {
        return medicineInventoryMapper.selectMedicineInventoryByMedicineId(medicineId);
    }

    /**
     * 查询药品库存管理列表
     * 
     * @param medicineInventory 药品库存管理
     * @return 药品库存管理
     */
    @Override
    public List<MedicineInventory> selectMedicineInventoryList(MedicineInventory medicineInventory)
    {
        return medicineInventoryMapper.selectMedicineInventoryList(medicineInventory);
    }

    /**
     * 新增药品库存管理
     * 
     * @param medicineInventory 药品库存管理
     * @return 结果
     */
    @Override
    public int insertMedicineInventory(MedicineInventory medicineInventory)
    {
        return medicineInventoryMapper.insertMedicineInventory(medicineInventory);
    }

    /**
     * 修改药品库存管理
     * 
     * @param medicineInventory 药品库存管理
     * @return 结果
     */
    @Override
    public int updateMedicineInventory(MedicineInventory medicineInventory)
    {
        return medicineInventoryMapper.updateMedicineInventory(medicineInventory);
    }

    /**
     * 批量删除药品库存管理
     * 
     * @param medicineIds 需要删除的药品库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMedicineInventoryByMedicineIds(Integer[] medicineIds)
    {
        return medicineInventoryMapper.deleteMedicineInventoryByMedicineIds(medicineIds);
    }

    /**
     * 删除药品库存管理信息
     * 
     * @param medicineId 药品库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMedicineInventoryByMedicineId(Integer medicineId)
    {
        return medicineInventoryMapper.deleteMedicineInventoryByMedicineId(medicineId);
    }
}
